<?php

include('include/header.php');

$film_id = $_GET['id'];

$mysql = mysql_connect("localhost", "root", "kGbN85Z");
mysql_query("USE ftp;");
$sql = mysql_query("SELECT `users`.`login` AS name, `vote` FROM `films_raiting` , `users` WHERE `users`.`id` = `user_id` AND `film_id` = '".mysql_real_escape_string($film_id)."' ORDER BY `vote` DESC;");
while($row = mysql_fetch_array($sql))
{
  echo $row['name']." - ".$row['vote']."\n";
}
mysql_close($mysql);

?>
